<?php
namespace app\mall\logic;

use app\data\model\DataUser;
use app\data\service\UserAdminService;
use think\facade\Db;
use think\facade\Log;

class SysconfigLogic{

    public static function get_config($item_key = '') {
        $builder = Db::table('sys_ad')
            ->where('deleted_at IS NULL');

        if (!empty($item_key)) {
            return $builder->where('title', '=', $item_key)->value('id', 'title', 'image', 'value');
        }

        return $builder->field('id, title, image, value')->select();
    }
}